package br.com.news.database.entities;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.news.database.utils.BaseEntity;

@Entity
@Table(name = "emailindicacao")
public class EmailIndicacaoEntity extends BaseEntity {

	private static final long serialVersionUID = 8278052410158969288L;

	@Id
	@GeneratedValue
	private Long idEmailIndicacao;

	@ManyToOne
	@JoinColumn(name="idNoticia")
	private NoticiaEntity noticia;

	@ManyToOne
	@JoinColumn(name="login")
	private UsuarioEntity usuario;

	private Date data;
	private String email;

	public EmailIndicacaoEntity() {
	}

	public EmailIndicacaoEntity(Long idEmailIndicacao, NoticiaEntity noticia, Date data,
			String email) {
		this.idEmailIndicacao = idEmailIndicacao;
		this.noticia = noticia;
		this.data = data;
		this.email = email;
	}

	public EmailIndicacaoEntity(Long idEmailIndicacao, NoticiaEntity noticia,
			UsuarioEntity usuario, Date data, String email) {
		this.idEmailIndicacao = idEmailIndicacao;
		this.noticia = noticia;
		this.usuario = usuario;
		this.data = data;
		this.email = email;
	}

	public Long getIdEmailIndicacao() {
		return this.idEmailIndicacao;
	}

	public void setIdEmailIndicacao(Long idEmailIndicacao) {
		this.idEmailIndicacao = idEmailIndicacao;
	}

	public NoticiaEntity getNoticia() {
		return this.noticia;
	}

	public void setNoticia(NoticiaEntity noticia) {
		this.noticia = noticia;
	}

	public UsuarioEntity getUsuario() {
		return this.usuario;
	}

	public void setUsuario(UsuarioEntity usuario) {
		this.usuario = usuario;
	}

	public Date getData() {
		return this.data;
	}

	public void setData(Date data) {
		this.data = data;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

}
